try:
    print(1/0)
except Exception as e:
    print(e) #division by zero

try:
    list1 = [1,2,3]
    print(list1[4])
except Exception as e:
    print(e) #list index out of range

try:
    print(b)
except Exception as e:
    print(e) #name 'b' is not defined